package cz.muni.fi.pa165.sme.dao.api;

import java.util.List;

import cz.muni.fi.pa165.sme.dao.entity.User;

/**
 *
 * An interface for management of {@link User} entities in a storage.
 * 
 * @author forman
 */

public interface UserDao {
    /**
     * Create a new user in the database
     * 
     * @param user new user
     */
    public void createUser(User user);

    /**
     * Update a user in the database
     * 
     * @param user updated user
     */
    public void updateUser(User user);

    /**
     * Returns the user with specified ID
     * 
     * @param id id of the user to return
     * @return user
     */
    public User getUser(Long id);

    /**
     * Deletes the user given as an argument to the method from the database
     * 
     * @param user user to be deleted
     */
    public void deleteUser(User user);

    /**
     * returns a list of all users within the database
     * 
     * @return list of all users
     */
    public List<User> findAllUser();

	/**
	 * returns a user by the provided login.
	 *
	 * @param login user's login to be looked for
	 * @return user
	 */
	public User getUserByLogin(final String login);

}	
